Still have questions? Join our Discord server and get real time help.
Log in to vote

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

Asked by 9 months ago
Edited 9 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
        script.Parent.Particles.Rate = 0
        enabled = true

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

Answer this question