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

Why Won't the part change size and shape in my script? (REMOTEEVENTS)?

Asked by 6 years ago
Edited 6 years ago

Ok so if you look at my script you will see in the server script i tried changing The first one is my local script which everything is right i think

--local script
local ScreenGui = script.Parent
local button = ScreenGui.TextButton
local Remote = game:GetService("ReplicatedStorage"):WaitForChild('RemoteEvent')


button.MouseButton1Click:Connect(function()


Remote:FireServer()

end)
--serverscript
local ScreenGui = script.Parent
local Button = ScreenGui.TextButton
local Remote = game:GetService("ReplicatedStorage"):WaitForChild('RemoteEvent')


Remote.OnServerEvent:Connect(function(player)
    print(player)
    print('0eventfired')
    local part = Instance.new("Part",workspace)
    part.Position = Vector3.new(0,0,0,0)
    part.Size = Vector3.new(10,10,10)
    part.Shape = 'Ball'
end)

0
the problem is likely where your server script is located. im guessing its in StarterGui, because its parent is the ScreenGui. you should move it to ServerScriptService and remove the variable for the ScreenGui. Gey4Jesus69 2705 — 6y
0
I think it's because he is printing just player, I made an answer, it should help him and fix his issue. TheOnlySmarts 233 — 6y
0
and the button variable DinozCreates 1070 — 6y
0
Anyway, I don't think it'd matter since he didn't use the variables at all, other than Remote? Odd. TheOnlySmarts 233 — 6y
0
the variables dont matter but theyre unused and unneeded and should be removed DinozCreates 1070 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago

theres four arguments in the Vector3.new declaration, perhaps this is throwing an error and thus won't run the .Size change

0
i thought u were an idiot until i realized what u were talking about. nice catch ;) Gey4Jesus69 2705 — 6y
0
thanks InfiniteYield 41 — 6y
0
Incorrect as well. The fourth argument is simply discarded. User#24403 69 — 6y
Ad

Answer this question