Ad
Log in to vote
0

Why does yet another simple server script of mine only work in studio...?

Asked by 2 months ago
Edited 2 months ago

This script is meant to fire (which it does in studio) when hitting specifically named objects and to play a sound as well as particles when hitting them, Nothing seems that complex here so why is it yet again only working in studio?

The block this is in is stored locally (moved into the Workspace via local script).

local enabled = true
function onTouched(hit)
    if enabled == true and
        hit.Name == "Object" or hit.Name == "Barrier" then
        enabled = false
        script.Parent.Particles.Rate = 250
            local Copy = script.Particles:Clone()
            Copy.Parent = hit
            Copy.Remover.Disabled = false
            wait(0.1)
        script.Sound:Play()
        script.Parent.Particles.Rate = 0
        enabled = true
    end
end


Connection = script.Parent.Touched:Connect(onTouched)
0
moving it to workspace via a local script isn't going to replicate to the server Vulkarin 548 — 2mo
0
^^^^ make it a regular script my friend CRICKET69 -2 — 2mo

Answer this question