#issues repeating a script + clientside script

1 messages · Page 1 of 1 (latest)

brittle wind
#

currently making it so when you hit a part it changes the skybox on the players side, i havent worked out how to make it so it only affects the player whos touching it and not the whole server, and the script also cannot repeat.

  1. need to make it so the script only affects a single person whos touched the part
  2. need to make the script able to be used multiple times

here's a video of me using the parts, the scripts will be in the message below.

#

sc script


script.Parent.Touched:Connect(function()
    game.Workspace.SC.Parent = game.Lighting
    script.Parent.CanCollide = false
    script.Parent.CanTouch = false
    script.Parent.CanQuery = false
    wait(5)
    script.Parent.CanCollide = true
    script.Parent.CanTouch = true
    script.Parent.CanQuery = true

end)

defaultsky script

script.Parent.Touched:Connect(function()
    game.Lighting.SC.Parent = game.Workspace
    game.Workspace.Defaultsky.Parent = game.Lighting
    script.Parent.CanCollide = false
    script.Parent.CanTouch = false
    script.Parent.CanQuery = false
    wait(5)
    script.Parent.CanCollide = true
    script.Parent.CanTouch = true
    script.Parent.CanQuery = true

end)

digital yew
#

Use local script

twilit crowBOT
#

studio** You are now Level 20! **studio

balmy narwhal
#

Make a server script inside the part that fires and event using event:FireClient(player)

or use a localscript inside the startercharacterscript that uses .touched to change only for the local player