#Trying to make this script for the Player who touched it.

1 messages · Page 1 of 1 (latest)

jaunty snow
#

Hello, so I'm trying to make a scary atmosphere (based on seildirectory) where when someone touches a hidden part, they teleport to this black box and get kicked and a message popups up which is a caesar cipher but it's as a ServerScript and I need help for to make it that the person who touched it only hears and gets kicked.

Code:

local sound = SoundService:WaitForChild("Relaxed Scene") 
local deathofears = SoundService:WaitForChild("Creepy Night")
sound:Play()

local Players = game:GetService("Players")

script.Parent.Touched:Connect(function(hit)
    local character = hit.Parent
    local humanoid = character:FindFirstChild("Humanoid")
    if humanoid then
        local player = Players:GetPlayerFromCharacter(character)
        if player then
            sound:Stop()
            deathofears:Play()
            character:MoveTo(workspace.sean.sean:WaitForChild("deatharrivestoeveryone").Position)
            task.wait(3)
            player:Kick("pa jvtlz vba vm wshpu zpnoa")
            deathofears:Stop()
        end
    end
end)```
balmy zenith
#

you can use a RemoteEvent or use Sound:PlayLocalSound()

jaunty snow
#

🤔

summer gazelleBOT
#

studio** You are now Level 4! **studio

jaunty snow
#

how do i use a remoteevent for this

raven vapor
#

there are some caps but the auto thing should do that for ya

#

to use a remote event just put one in replicated storage and fire it to the client/server depending on which one this is, and do the sound there