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

[HELP?]Script works in studio but not in Roblox

Asked by 8 years ago

I have written a script to change players shirt and pant when it touches the spawn point... The script works great on Roblox Studio Test and Roblox Studio Server Test... but when I publish the game to Roblox.com then the script no longer works.... the script is below :

local set = script.Parent
local shirt = game.ServerStorage.Shirt:Clone()
local pant = game.ServerStorage.Pants:Clone()

local function steppedOn (part)
    local parent = part.Parent
    if game.Players:GetPlayerFromCharacter(parent) then
        if parent:findFirstChild("Shirt") and parent.Shirt:findFirstChild("on") == false then
            parent.Shirt:destroy()
            parent.Pants:destroy()
        end
        wait(.5)
        shirt.Parent = parent
        pant.Parent = parent    
    end
end

set.Touched:connect(steppedOn)

PLS HELP!!!!

0
Is the script local or regular? Acheo 230 — 8y
0
Try putting the shirt and pants in replicated storage rather than server storage. GoldenPhysics 474 — 8y
0
the script is regualr MushfiqRoblox101 20 — 8y

Answer this question