Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you put this script in a Localscript inside a part?

Asked by 5 years ago
Edited 5 years ago

How do you put this script in a Localscript which is inside a part?

    local part = game:GetService("Workspace").Part

    part.Touched:Connect(function(hit)
        if hit.Parent.Name == game.Players.LocalPlayer.Name then --Checks if the local player touched!
          part.BrickColor = BrickColor.new("Bright red")
        end
    end)

0
Not possible. LocalScripts don't run in the Workspace. DeceptiveCaster 3761 — 5y

Answer this question