Welcome to the Forums!
Join thousands of other Roblox members with a free account.
Create Forum Account

Important How to post a scripting question

  • This website was created by Roblox members to replace the official forums (because Roblox shut them down) Join us if you like Roblox!
Status
Not open for further replies.

Aaron

Administrator
Administrator
Reputation: 0 / 0 / 0
Dec 8, 2017
1,462
5
1,025
113


Posting a question

If you're looking for scripting help, it's much easier for people to help you if you make your question clear.



Make your Title SPECIFIC

Not: "help me please"
Good example: "Error with depth script"

This makes it easier for other people that also need help with a similar issue to find your thread.


Problem Solved?


If someone fixes your problem, please click on the "Mark as solution" button by their post. This helps future people that have the same issue.

solution-gif.gif






Sharing Code

When sharing code, please use the code tag, this makes it much nicer to understand your code.

codeinsert copy.png

This will make your code look like this:

Example from @CallMeKY:
local bodyColor = Color3.new(0.152941, 0.333333, 0.00392157)

local players = game:GetService('Players')
local runService = game:GetService('RunService')

script.Parent.Touched:Connect(function(part)
    local character = part:FindFirstAncestorOfClass('Model')
    if not players:GetPlayerFromCharacter(character) then return end
    local humanoid = character:FindFirstChildOfClass('Humanoid')
    if not humanoid then return end

    local descriptionClone = humanoid:GetAppliedDescription()
    if descriptionClone.HeadColor == bodyColor then return end
    descriptionClone.HeadColor = bodyColor
    descriptionClone.TorsoColor = bodyColor
    descriptionClone.LeftArmColor = bodyColor
    descriptionClone.LeftLegColor = bodyColor
    descriptionClone.RightArmColor = bodyColor
    descriptionClone.RightLegColor = bodyColor
   
    humanoid:ApplyDescription(descriptionClone)
   
    for _, playingTracks in pairs(humanoid:GetPlayingAnimationTracks()) do
        playingTracks:Stop()
    end
   
    local animateScript = humanoid.Parent:WaitForChild('Animate')
    animateScript.run.RunAnim.AnimationId = 'rbxassetid://616163682'        -- Run
    animateScript.walk.WalkAnim.AnimationId = 'rbxassetid://616168032'      -- Walk
    animateScript.jump.JumpAnim.AnimationId = 'rbxassetid://616161997'      -- Jump
    animateScript.idle.Animation1.AnimationId = 'rbxassetid://616158929'    -- Idle (Variation 1)
    animateScript.idle.Animation2.AnimationId = 'rbxassetid://616160636'    -- Idle (Variation 2)
   
    local ws = humanoid.WalkSpeed
    humanoid.WalkSpeed = 0
    wait(0.05)
    humanoid.WalkSpeed = ws
   
end)




Not posting a question?

If you're not intending to ask a question, please select "No" to "Allow question actions" when posting your thread. This way the "solution" and voting will not be enabled.
 

Attachments

  • codeinsert.png
    codeinsert.png
    36.6 KB · Views: 9
Last edited:
Status
Not open for further replies.