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

The same thing everytime I try to make a game, every. single. time. Any fixes?

Asked by
w1_1 2
5 years ago

So, everytime I make a game, it works on studio and NOT in the servers, is there a fix for this? In this one when I clicked the clickdetector, it didn't do anything nor gave me an error.

script.Parent.MouseClick:Connect(function()
script.Parent.Parent.Parent.ClosedChest.Parent = game.ReplicatedStorage -- Hiding the closed chest
local chest = game.ReplicatedStorage.Chest:Clone() -- Cloning the opened chest
chest.Parent = workspace
chest:SetPrimaryPartCFrame(CFrame.new(script.Parent.Parent.Parent.chestloc.Position))  --Teleporting the open chest to the location of a brick called "chest location" to make it look like it opened up
script.Parent:Destroy() -- Deleting the clickdetector
end)
0
Is that in a ServerScript or LocalScript? herrtt 387 — 5y
0
@herrtt serverscript. w1_1 2 — 5y
0
are you using filtering enabled? Despayr 505 — 5y
0
Nope, It's off. w1_1 2 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

I would teleport the Closed chest to a random location instead of putting it to a ReplicatedStorage so your code would look like this in my case:

(Make sure to turn on Filtering Enabled)

local ReplicatedStorage = game:GetService("ReplicatedStorage")

script.Parent.MouseClick:Connect(function()

script.Parent.Parent.Parent.ClosedChest:MoveTo(CFrame.new(99999, 99999, 99999)) 

local chest = game:GetService("Workspace"):WaitForChild("Chest")

chest:SetPrimaryPartCFrame(CFrame.new(script.Parent.Parent.Parent.chestloc.Position))

wait(.05)
script.Parent:Destroy() -- Deleting the clickdetector

end)

I think that this would not work but it's worth a try! EDIT: Configured it for the opened chest somewhere in the Workspace!

0
Nope, stii doesnt work.. however it works on studio w1_1 2 — 5y
0
Alright AswormeDorijan111 531 — 5y
0
Put the opened chest somewhere in the workspace AswormeDorijan111 531 — 5y
0
And I'll edit the script AswormeDorijan111 531 — 5y
0
Edited it just make sure to put the opened chest somewhere in the workspace! (Hide it) AswormeDorijan111 531 — 5y
Ad

Answer this question